#include<stdio.h>
#include"process.h"
#include<string.h>
#include<unistd.h>

#define NUM 101
void process()
{
char bar[NUM];
memset(bar,'\0',sizeof(bar));
int cnt = 0;
    const char *label = "|/-\\";
int len  =strlen(label) ;
while(cnt <= 100)
{
    printf("[%-100s][%d%%][%c]\r",bar,cnt,label[cnt%len]);
    fflush(stdout);
    bar[cnt++] = '=';
    if(cnt == 101) break;
    bar[cnt] = '>';
    
    usleep(100000);
}
printf("\r\n");
}
